package com.lanp.gencode.test;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;

public class T14 {

    public static void main(String[] args) throws IOException, InterruptedException {
        File file = new File("E:\\code\\jp\\code-test\\b.json");
        String file1 = FileUtils.readFileToString(file);//前面两行是读取文件
        String[] split = file1.split("\n");
        StringBuilder sb = new StringBuilder();
        sb.append("zadd company_include_policy_whitelist_zset");
        int i = 1;
        for (String s : split) {
            String storeId = s.substring(8, s.length() - 2);
            Thread.sleep(1);
            sb.append(" " + System.currentTimeMillis());
            sb.append(" " + storeId);
            if ((i % 1000) == 0 || i == split.length) {
                System.out.println("---- 打印中 ----" + i);
                System.out.println(sb);
                sb.setLength(0);
                sb.append("zadd company_include_policy_whitelist_zset");
            }
            i++;
        }
        System.out.println(sb.toString());
    }

}
